From 23cd9d6d2ee1efafe639825496137bc66d7f15e9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bartosz=20Dziewo=C5=84ski?= Date: Thu, 26 Jul 2018 21:55:24 +0200 Subject: [PATCH] Prefill date in form on Special:Log when calling with old parameters When the date is specified using &year=...&month=... URL parameters rather than &wpdate=..., HTMLForm can't automatically fill it in, but we can explicitly specify the default. Bug: T199856 Change-Id: I71f4953d57a3893190778e5bd763db108dc433d3 --- includes/logging/LogEventsList.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/includes/logging/LogEventsList.php b/includes/logging/LogEventsList.php index 559ac87eca..f032efc5c5 100644 --- a/includes/logging/LogEventsList.php +++ b/includes/logging/LogEventsList.php @@ -144,7 +144,8 @@ class LogEventsList extends ContextSource { // Date menu $formDescriptor['date'] = [ 'type' => 'date', - 'label-message' => 'date' + 'label-message' => 'date', + 'default' => sprintf( "%04d-%02d-%02d", $year, $month, $day ), ]; // Tag filter -- 2.20.1